<template>
  <subtitle-pc
    v-if="!hasUiSubtitle"
    :data="textList"
    :immerse="!ttsa.controller"
  ></subtitle-pc>
</template>
<script
  lang="ts"
  setup
  name="WSubtitle"
>
import { useTtsaStore } from '@/store/ttsa';
import { useUIStore } from "@/store/ui";

const ttsa = useTtsaStore();

const textList = computed(() => ttsa?.subtitles);

const UIStore = useUIStore()
const UIList = computed(() => (UIStore.container as any) || []);

const hasUiSubtitle = computed(() =>
  Object.keys(UIList.value).some((i) => UIList.value[i].type === "widget_subtitle")
);

</script>


